const goodsService = require('../../service/goodsService');
const goodsRouter = {
  prefix: '/goods',
  routers: [
    {
      url: '/findAllName',
      method: 'get',
      handler: goodsService.findAllName
    },
    {
      method: 'get',
      url: '/:id',
      handler: goodsService.findById
    },
    {
      method: 'get',
      handler: goodsService.find
    },
    {
      method: 'post',
      handler: goodsService.create
    },
    {
      method: 'put',
      handler: goodsService.update
    }
  ]
}

module.exports = goodsRouter;